import java.util.Scanner;

public class Main {


    private static int getMaxOuIndex(int[] a){

        //通过遍历数组获取最大偶数
        int index = -1;
        for(int i = 0;i < a.length;i++){
            //找到偶数
            if(a[i] % 2 == 0){
                //是不是第一次找到
                if(index == -1){
                    index = i;
                }else if(a[index] < a[i]){
                    index = i;
                }
            }
        }
        //返回
        return index;
    }

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        while (in.hasNextInt()) {
            int n = in.nextInt();
            long k = in.nextLong();

            int[] a = new int[n];

            for(int i = 0;i < n;i++){
                a[i] = in.nextInt();
            }

            while(k > 0){

                //获取最大偶数
                int index = getMaxOuIndex(a);
                if(index != -1)
                a[index] = a[index] / 2;

                k--;
            }

            int sum = 0;
            for(int i = 0;i < n;i++){
                sum += a[i];
            }
            System.out.println(sum);
        }
    }

    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int x = in.nextInt();

        int[] a = new int[n];
        for(int i = 0;i < n;i++){
            a[i] = in.nextInt();
        }

        int left = 0;
        int right =  0;
        int i = 0;
        int minLen = 0;
        for(;i < n;i++){
            int sum = 0;
            int j = 0;
            for(j = i;j < n;j++){
                sum += a[j];
                if(sum >= x){
                    if(minLen == 0){
                        left = i;
                        right = j;
                        minLen = right - left + 1;
                    }else{
                        if(minLen > j - i + 1){
                            left = i;
                            right = j;
                            minLen = j - i + 1;
                        }else if(minLen == j - i + 1 && i < left){
                            left = i;
                            right = j;
                        }
                    }

                    break;
                }
            }

        }
        System.out.println(left + 1 + " " + right + 1);
    }
}